#!/bin/bash

echo "正在编译$1.cpp..."
g++ -std=c++17 -g -DLOCAL $1.cpp -o $1.out
if [ $? -eq 0 ] 
then 
    echo "编译成功！"
    echo "开始运行..."
    ./$1.out
    echo "运行成功！"
    echo "输出运行结果："
    cat out.txt
else
    echo "编译失败！"
fi